Optimal. Leaf size=213 \[ -\frac {(-3 b e g+4 c d g+2 c e f) \tan ^{-1}\left (\frac {e (b+2 c x)}{2 \sqrt {c} \sqrt {d (c d-b e)-b e^2 x-c e^2 x^2}}\right )}{2 c^{5/2} e^2}+\frac {\sqrt {d (c d-b e)-b e^2 x-c e^2 x^2} (-3 b e g+4 c d g+2 c e f)}{c^2 e^2 (2 c d-b e)}+\frac {2 (d+e x)^2 (-b e g+c d g+c e f)}{c e^2 (2 c d-b e) \sqrt {d (c d-b e)-b e^2 x-c e^2 x^2}} \]
________________________________________________________________________________________
Rubi [A] time = 0.28, antiderivative size = 213, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, integrand size = 44, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.091, Rules used = {788, 640, 621, 204} \begin {gather*} \frac {\sqrt {d (c d-b e)-b e^2 x-c e^2 x^2} (-3 b e g+4 c d g+2 c e f)}{c^2 e^2 (2 c d-b e)}-\frac {(-3 b e g+4 c d g+2 c e f) \tan ^{-1}\left (\frac {e (b+2 c x)}{2 \sqrt {c} \sqrt {d (c d-b e)-b e^2 x-c e^2 x^2}}\right )}{2 c^{5/2} e^2}+\frac {2 (d+e x)^2 (-b e g+c d g+c e f)}{c e^2 (2 c d-b e) \sqrt {d (c d-b e)-b e^2 x-c e^2 x^2}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 204
Rule 621
Rule 640
Rule 788
Rubi steps
\begin {align*} \int \frac {(d+e x)^2 (f+g x)}{\left (c d^2-b d e-b e^2 x-c e^2 x^2\right )^{3/2}} \, dx &=\frac {2 (c e f+c d g-b e g) (d+e x)^2}{c e^2 (2 c d-b e) \sqrt {d (c d-b e)-b e^2 x-c e^2 x^2}}-\frac {(2 c e f+4 c d g-3 b e g) \int \frac {d+e x}{\sqrt {c d^2-b d e-b e^2 x-c e^2 x^2}} \, dx}{c e (2 c d-b e)}\\ &=\frac {2 (c e f+c d g-b e g) (d+e x)^2}{c e^2 (2 c d-b e) \sqrt {d (c d-b e)-b e^2 x-c e^2 x^2}}+\frac {(2 c e f+4 c d g-3 b e g) \sqrt {d (c d-b e)-b e^2 x-c e^2 x^2}}{c^2 e^2 (2 c d-b e)}-\frac {(2 c e f+4 c d g-3 b e g) \int \frac {1}{\sqrt {c d^2-b d e-b e^2 x-c e^2 x^2}} \, dx}{2 c^2 e}\\ &=\frac {2 (c e f+c d g-b e g) (d+e x)^2}{c e^2 (2 c d-b e) \sqrt {d (c d-b e)-b e^2 x-c e^2 x^2}}+\frac {(2 c e f+4 c d g-3 b e g) \sqrt {d (c d-b e)-b e^2 x-c e^2 x^2}}{c^2 e^2 (2 c d-b e)}-\frac {(2 c e f+4 c d g-3 b e g) \operatorname {Subst}\left (\int \frac {1}{-4 c e^2-x^2} \, dx,x,\frac {-b e^2-2 c e^2 x}{\sqrt {c d^2-b d e-b e^2 x-c e^2 x^2}}\right )}{c^2 e}\\ &=\frac {2 (c e f+c d g-b e g) (d+e x)^2}{c e^2 (2 c d-b e) \sqrt {d (c d-b e)-b e^2 x-c e^2 x^2}}+\frac {(2 c e f+4 c d g-3 b e g) \sqrt {d (c d-b e)-b e^2 x-c e^2 x^2}}{c^2 e^2 (2 c d-b e)}-\frac {(2 c e f+4 c d g-3 b e g) \tan ^{-1}\left (\frac {e (b+2 c x)}{2 \sqrt {c} \sqrt {d (c d-b e)-b e^2 x-c e^2 x^2}}\right )}{2 c^{5/2} e^2}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.58, size = 201, normalized size = 0.94 \begin {gather*} \frac {\sqrt {c} \sqrt {e} (d+e x) \sqrt {e (2 c d-b e)} (c (3 d g+2 e f-e g x)-3 b e g)+e \sqrt {d+e x} (b e-2 c d) \sqrt {\frac {b e-c d+c e x}{b e-2 c d}} (-3 b e g+4 c d g+2 c e f) \sin ^{-1}\left (\frac {\sqrt {c} \sqrt {e} \sqrt {d+e x}}{\sqrt {e (2 c d-b e)}}\right )}{c^{5/2} e^{5/2} \sqrt {e (2 c d-b e)} \sqrt {(d+e x) (c (d-e x)-b e)}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
IntegrateAlgebraic [A] time = 6.38, size = 285, normalized size = 1.34 \begin {gather*} -\frac {\sqrt {-c e^2} (-3 b e g+4 c d g+2 c e f) \log \left (b^2 e^2-8 c x \sqrt {-c e^2} \sqrt {-b d e-b e^2 x+c d^2-c e^2 x^2}-4 b c d e-4 b c e^2 x+4 c^2 d^2-8 c^2 e^2 x^2\right )}{4 c^3 e^3}+\frac {(-3 b e g+4 c d g+2 c e f) \tan ^{-1}\left (\frac {\sqrt {c} \left (2 \sqrt {-b d e-b e^2 x+c d^2-c e^2 x^2}-2 x \sqrt {-c e^2}\right )}{b e}\right )}{2 c^{5/2} e^2}+\frac {\sqrt {-b d e-b e^2 x+c d^2-c e^2 x^2} (3 b e g-3 c d g-2 c e f+c e g x)}{c^2 e^2 (b e-c d+c e x)} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.95, size = 503, normalized size = 2.36 \begin {gather*} \left [-\frac {{\left (2 \, {\left (c^{2} d e - b c e^{2}\right )} f + {\left (4 \, c^{2} d^{2} - 7 \, b c d e + 3 \, b^{2} e^{2}\right )} g - {\left (2 \, c^{2} e^{2} f + {\left (4 \, c^{2} d e - 3 \, b c e^{2}\right )} g\right )} x\right )} \sqrt {-c} \log \left (8 \, c^{2} e^{2} x^{2} + 8 \, b c e^{2} x - 4 \, c^{2} d^{2} + 4 \, b c d e + b^{2} e^{2} - 4 \, \sqrt {-c e^{2} x^{2} - b e^{2} x + c d^{2} - b d e} {\left (2 \, c e x + b e\right )} \sqrt {-c}\right ) - 4 \, {\left (c^{2} e g x - 2 \, c^{2} e f - 3 \, {\left (c^{2} d - b c e\right )} g\right )} \sqrt {-c e^{2} x^{2} - b e^{2} x + c d^{2} - b d e}}{4 \, {\left (c^{4} e^{3} x - c^{4} d e^{2} + b c^{3} e^{3}\right )}}, -\frac {{\left (2 \, {\left (c^{2} d e - b c e^{2}\right )} f + {\left (4 \, c^{2} d^{2} - 7 \, b c d e + 3 \, b^{2} e^{2}\right )} g - {\left (2 \, c^{2} e^{2} f + {\left (4 \, c^{2} d e - 3 \, b c e^{2}\right )} g\right )} x\right )} \sqrt {c} \arctan \left (\frac {\sqrt {-c e^{2} x^{2} - b e^{2} x + c d^{2} - b d e} {\left (2 \, c e x + b e\right )} \sqrt {c}}{2 \, {\left (c^{2} e^{2} x^{2} + b c e^{2} x - c^{2} d^{2} + b c d e\right )}}\right ) - 2 \, {\left (c^{2} e g x - 2 \, c^{2} e f - 3 \, {\left (c^{2} d - b c e\right )} g\right )} \sqrt {-c e^{2} x^{2} - b e^{2} x + c d^{2} - b d e}}{2 \, {\left (c^{4} e^{3} x - c^{4} d e^{2} + b c^{3} e^{3}\right )}}\right ] \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [B] time = 0.62, size = 427, normalized size = 2.00 \begin {gather*} \frac {\sqrt {-c x^{2} e^{2} + c d^{2} - b x e^{2} - b d e} {\left ({\left (\frac {{\left (4 \, c^{3} d^{2} g e^{3} - 4 \, b c^{2} d g e^{4} + b^{2} c g e^{5}\right )} x}{4 \, c^{4} d^{2} e^{3} - 4 \, b c^{3} d e^{4} + b^{2} c^{2} e^{5}} - \frac {8 \, c^{3} d^{3} g e^{2} + 8 \, c^{3} d^{2} f e^{3} - 20 \, b c^{2} d^{2} g e^{3} - 8 \, b c^{2} d f e^{4} + 14 \, b^{2} c d g e^{4} + 2 \, b^{2} c f e^{5} - 3 \, b^{3} g e^{5}}{4 \, c^{4} d^{2} e^{3} - 4 \, b c^{3} d e^{4} + b^{2} c^{2} e^{5}}\right )} x - \frac {12 \, c^{3} d^{4} g e + 8 \, c^{3} d^{3} f e^{2} - 24 \, b c^{2} d^{3} g e^{2} - 8 \, b c^{2} d^{2} f e^{3} + 15 \, b^{2} c d^{2} g e^{3} + 2 \, b^{2} c d f e^{4} - 3 \, b^{3} d g e^{4}}{4 \, c^{4} d^{2} e^{3} - 4 \, b c^{3} d e^{4} + b^{2} c^{2} e^{5}}\right )}}{c x^{2} e^{2} - c d^{2} + b x e^{2} + b d e} - \frac {{\left (4 \, c d g + 2 \, c f e - 3 \, b g e\right )} \sqrt {-c e^{2}} e^{\left (-3\right )} \log \left ({\left | -2 \, {\left (\sqrt {-c e^{2}} x - \sqrt {-c x^{2} e^{2} + c d^{2} - b x e^{2} - b d e}\right )} c - \sqrt {-c e^{2}} b \right |}\right )}{2 \, c^{3}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [B] time = 0.06, size = 1320, normalized size = 6.20 \begin {gather*} \frac {3 b^{3} e^{4} g x}{2 \left (-b^{2} e^{4}+4 b c d \,e^{3}-4 d^{2} e^{2} c^{2}\right ) \sqrt {-c \,e^{2} x^{2}-b \,e^{2} x -b d e +c \,d^{2}}\, c^{2}}-\frac {6 b^{2} d \,e^{3} g x}{\left (-b^{2} e^{4}+4 b c d \,e^{3}-4 d^{2} e^{2} c^{2}\right ) \sqrt {-c \,e^{2} x^{2}-b \,e^{2} x -b d e +c \,d^{2}}\, c}-\frac {b^{2} e^{4} f x}{\left (-b^{2} e^{4}+4 b c d \,e^{3}-4 d^{2} e^{2} c^{2}\right ) \sqrt {-c \,e^{2} x^{2}-b \,e^{2} x -b d e +c \,d^{2}}\, c}+\frac {6 b \,d^{2} e^{2} g x}{\left (-b^{2} e^{4}+4 b c d \,e^{3}-4 d^{2} e^{2} c^{2}\right ) \sqrt {-c \,e^{2} x^{2}-b \,e^{2} x -b d e +c \,d^{2}}}+\frac {4 b d \,e^{3} f x}{\left (-b^{2} e^{4}+4 b c d \,e^{3}-4 d^{2} e^{2} c^{2}\right ) \sqrt {-c \,e^{2} x^{2}-b \,e^{2} x -b d e +c \,d^{2}}}+\frac {3 b^{4} e^{4} g}{4 \left (-b^{2} e^{4}+4 b c d \,e^{3}-4 d^{2} e^{2} c^{2}\right ) \sqrt {-c \,e^{2} x^{2}-b \,e^{2} x -b d e +c \,d^{2}}\, c^{3}}-\frac {3 b^{3} d \,e^{3} g}{\left (-b^{2} e^{4}+4 b c d \,e^{3}-4 d^{2} e^{2} c^{2}\right ) \sqrt {-c \,e^{2} x^{2}-b \,e^{2} x -b d e +c \,d^{2}}\, c^{2}}-\frac {b^{3} e^{4} f}{2 \left (-b^{2} e^{4}+4 b c d \,e^{3}-4 d^{2} e^{2} c^{2}\right ) \sqrt {-c \,e^{2} x^{2}-b \,e^{2} x -b d e +c \,d^{2}}\, c^{2}}+\frac {3 b^{2} d^{2} e^{2} g}{\left (-b^{2} e^{4}+4 b c d \,e^{3}-4 d^{2} e^{2} c^{2}\right ) \sqrt {-c \,e^{2} x^{2}-b \,e^{2} x -b d e +c \,d^{2}}\, c}+\frac {2 b^{2} d \,e^{3} f}{\left (-b^{2} e^{4}+4 b c d \,e^{3}-4 d^{2} e^{2} c^{2}\right ) \sqrt {-c \,e^{2} x^{2}-b \,e^{2} x -b d e +c \,d^{2}}\, c}+\frac {2 \left (-2 c \,e^{2} x -b \,e^{2}\right ) d^{2} f}{\left (-b^{2} e^{4}-4 \left (-b d e +c \,d^{2}\right ) c \,e^{2}\right ) \sqrt {-c \,e^{2} x^{2}-b \,e^{2} x -b d e +c \,d^{2}}}-\frac {g \,x^{2}}{\sqrt {-c \,e^{2} x^{2}-b \,e^{2} x -b d e +c \,d^{2}}\, c}-\frac {3 b g x}{2 \sqrt {-c \,e^{2} x^{2}-b \,e^{2} x -b d e +c \,d^{2}}\, c^{2}}+\frac {3 b g \arctan \left (\frac {\sqrt {c \,e^{2}}\, \left (x +\frac {b}{2 c}\right )}{\sqrt {-c \,e^{2} x^{2}-b \,e^{2} x -b d e +c \,d^{2}}}\right )}{2 \sqrt {c \,e^{2}}\, c^{2}}+\frac {2 d g x}{\sqrt {-c \,e^{2} x^{2}-b \,e^{2} x -b d e +c \,d^{2}}\, c e}-\frac {2 d g \arctan \left (\frac {\sqrt {c \,e^{2}}\, \left (x +\frac {b}{2 c}\right )}{\sqrt {-c \,e^{2} x^{2}-b \,e^{2} x -b d e +c \,d^{2}}}\right )}{\sqrt {c \,e^{2}}\, c e}+\frac {f x}{\sqrt {-c \,e^{2} x^{2}-b \,e^{2} x -b d e +c \,d^{2}}\, c}-\frac {f \arctan \left (\frac {\sqrt {c \,e^{2}}\, \left (x +\frac {b}{2 c}\right )}{\sqrt {-c \,e^{2} x^{2}-b \,e^{2} x -b d e +c \,d^{2}}}\right )}{\sqrt {c \,e^{2}}\, c}+\frac {3 b^{2} g}{4 \sqrt {-c \,e^{2} x^{2}-b \,e^{2} x -b d e +c \,d^{2}}\, c^{3}}-\frac {3 b d g}{\sqrt {-c \,e^{2} x^{2}-b \,e^{2} x -b d e +c \,d^{2}}\, c^{2} e}-\frac {b f}{2 \sqrt {-c \,e^{2} x^{2}-b \,e^{2} x -b d e +c \,d^{2}}\, c^{2}}+\frac {3 d^{2} g}{\sqrt {-c \,e^{2} x^{2}-b \,e^{2} x -b d e +c \,d^{2}}\, c \,e^{2}}+\frac {2 d f}{\sqrt {-c \,e^{2} x^{2}-b \,e^{2} x -b d e +c \,d^{2}}\, c e} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F(-2)] time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: ValueError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [F] time = 0.00, size = -1, normalized size = -0.00 \begin {gather*} \int \frac {\left (f+g\,x\right )\,{\left (d+e\,x\right )}^2}{{\left (c\,d^2-b\,d\,e-c\,e^2\,x^2-b\,e^2\,x\right )}^{3/2}} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\left (d + e x\right )^{2} \left (f + g x\right )}{\left (- \left (d + e x\right ) \left (b e - c d + c e x\right )\right )^{\frac {3}{2}}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________